package jsu.lipengcheng.trafficnet.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jsu.lipengcheng.trafficnet.pojo.Ticket;
import jsu.lipengcheng.trafficnet.pojo.TicketVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface TicketMapper extends BaseMapper<Ticket> {
    List<TicketVO> selectByUserId(Integer id);

    List<TicketVO> selectallbytime(Integer userId, LocalDate createTime);

    @Select("select count(id) from ticket")
    int selectsum();
}
